package com.orchard.orchardfarmmanagementsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.orchard.orchardfarmmanagementsystem.entity.TaskExecutorRelation;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface TaskExecutorRelationMapper extends BaseMapper<TaskExecutorRelation> {

    @Insert("INSERT INTO taskassignment (task_id, user_id, assigned_at, status) VALUES (#{taskId}, #{executorId}, #{assignedAt}, #{status})")
    void insertTaskExecutorRelation(@Param("taskId") Integer taskId, 
                                    @Param("executorId") Integer executorId, 
                                    @Param("assignedAt") LocalDateTime assignedAt,
                                    @Param("status") String status);

}